package com.hand.test.config;/**
 * @author Estelle@앙수청
 * @date 2019/7/20 16:03
 */

import com.hand.test.interceptor.ControllerInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 *  @author Estelle@앙수청
 *  @date 2019/7/20 16:03
 */
//@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Autowired
    private ControllerInterceptor interceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(interceptor).addPathPatterns("/**");
    }
}
